<?php

//file_put_contents('./pay_log.txt', date('Y-m-d H:i:s', time()).'  '.json_encode($_POST, JSON_UNESCAPED_UNICODE)."\n", FILE_APPEND);

/*
 * 返回举例
$_POST =  array (
  'total_fee' => '1', //总费用，单位为分
  'transaction_id' => '4200000471201911111796739187', //微信交易订单号
  'order_sn' => '10001',//iupay订单id
  'out_trade_no' => '20191111103220562',//自定义订单
  'sign' => 'EE5D2CAC3D5FD3B56615F35334075014',
)*/
$config = require_once './config.php';
include 'sdk/iupay.php';
$iupay = new IUPay($config);
$data = $iupay->callback($_REQUEST);//进行签名校验

file_put_contents('./pay_log.txt', date('Y-m-d H:i:s', time()).'  '.json_encode($data, JSON_UNESCAPED_UNICODE)."\n", FILE_APPEND);

